package com.pachiraframework.springcloud.zhujie.config;



import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver;

import com.pachiraframework.springcloud.zhujie.domain.Sport;
import com.pachiraframework.springcloud.zhujie.domain.User;

//@Configuration
public class TdkConfig extends WebMvcConfigurerAdapter {

	
  @Bean
  public User user() {
	  User user = new User();
	  user.setName("asa");
	  user.setAge("11");
	  
    return user;
  }
  @Bean
  public Sport sport() {
	  Sport sport = new Sport();
	  sport.setName("asa");
	  sport.setAge("11");
	  
    return sport;
  }
	
	
	
	
	
//  @Bean
//  public FreeMarkerViewResolver viewResolver() {
//    TdkFreeMarkerViewResolver viewResolver = new TdkFreeMarkerViewResolver();
//    viewResolver.setOrder(1);
//    viewResolver.setPrefix("");
//    viewResolver.setSuffix(".ftl");
//    viewResolver.setCache(false);   //Set to true during production
//    viewResolver.setContentType("text/html;charset=UTF-8");
//    return viewResolver;
//  }

//  @Bean
//  public ApiConfig apiConfig(ApplicationContext applicationContext){
//    ApiConfig apiConfig = new  ApiConfig(applicationContext);
//    return apiConfig;
//  }
//
//  @Bean
//  public HttpService httpService(ApiConfig apiConfig){
//    HttpService httpService = new HttpService(apiConfig);
//    return httpService;
//  }
//
//  @Bean
//  public HttpServiceCache httpServiceCache(HttpService httpService,StringRedisTemplate stringRedisTemplate){
//    stringRedisTemplate.setValueSerializer(new Jackson2JsonRedisSerializer(TdkModel.class));
//    return new HttpServiceCache(httpService,stringRedisTemplate);
//  }

}
